import type { App } from 'vue'

// 引入naive组件
import {
  create,
  NButton,
  NForm,
  NFormItem,
  NInput,
  NInputNumber,
  NSelect,
  NCheckbox,
  NCheckboxGroup,
  NRadio,
  NRadioGroup,
  NSwitch,
  NDatePicker,
  NTree,
  NTreeSelect,
  NMessageProvider,
  NDialogProvider,
  NLoadingBarProvider,
  NNotificationProvider,
  NConfigProvider,
  NLayout,
  NLayoutSider,
  NLayoutHeader,
  NLayoutContent,
  NLayoutFooter,
  NMenu,
  NIcon,
  NSpin,
  NBreadcrumb,
  NBreadcrumbItem,
  NAvatar,
  NDropdown,
  NDataTable,
  NCard,
  NModal,
  NSpace,
  NGrid,
  NGridItem,
  NFormItemGi,
  NPagination,
  NThing,
  NProgress,
  NTooltip,
  NUpload
} from 'naive-ui'

const naive = create({
  components: [
    NButton,
    NForm,
    NFormItem,
    NInput,
    NInputNumber,
    NSelect,
    NCheckbox,
    NCheckboxGroup,
    NRadio,
    NRadioGroup,
    NSwitch,
    NDatePicker,
    NTree,
    NTreeSelect,
    NMessageProvider,
    NDialogProvider,
    NLoadingBarProvider,
    NNotificationProvider,
    NConfigProvider,
    NLayout,
    NLayoutSider,
    NLayoutHeader,
    NLayoutContent,
    NLayoutFooter,
    NMenu,
    NIcon,
    NSpin,
    NBreadcrumb,
    NBreadcrumbItem,
    NAvatar,
    NDropdown,
    NDataTable,
    NCard,
    NModal,
    NSpace,
    NGrid,
    NGridItem,
    NFormItemGi,
    NPagination,
    NThing,
    NProgress,
    NTooltip,
    NUpload
  ]
})

export function setupNaive(app: App<Element>) {
  app.use(naive)
}
